#include "widget.h"
#include "ui_widget.h"
#include<QDebug>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    ui->dial->setMinimum(0);
    ui->dial->setMaximum(100);
    ui->dial->setValue(80);
    ui->dial->setSingleStep(1);
    ui->dial->setWrapping(true);

    ui->dial->setNotchesVisible(true);

}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_dial_valueChanged(int value)
{

    qDebug()<<"不透明度为: "<<QString::number(value);
    this->setWindowOpacity((double)value/100);
}
